local extension = Package:new("thb_cards", Package.CardPack)
extension.extensionName = "thbattle"

extension:loadSkillSkelsByPath("./packages/thbattle/pkg/thb_cards/skills")

dofile("packages/thbattle/pkg/thb_cards/trans.lua")

local danmu__slash = fk.CreateCard {
  name = "danmu__slash",
  skill = "danmu__slash_skill",
  type = Card.TypeBasic,
  is_damage_card = true,
}
local cadan__jink = fk.CreateCard {
  name = "cadan__jink",
  skill = "jink_skill",
  type = Card.TypeBasic,
  is_passive = true,
}

local jiu = fk.CreateCard {
  name = "jiu",
  skill = "jiu_skill",
  type = Card.TypeBasic,
}

local exinwan = fk.CreateCard {
  name = "exinwan",
  type = Card.TypeBasic,
}

local mashu__peach = fk.CreateCard {
  name = "mashu__peach",
  skill = "peach_skill",
  type = Card.TypeBasic
}

local guangxuemicai__eight_diagram = fk.CreateCard {
  name = "guangxuemicai__eight_diagram",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = "#guangxuemicai__eight_diagram_skill",
}

local tiangoudun__nioh_shield = fk.CreateCard {
  name = "tiangoudun__nioh_shield",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = "#tiangoudun__nioh_shield_skill",
}

local GreenUFO = fk.CreateCard {
  name = "GreenUFO",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeDefensiveRide,
  equip_skill = "#GreenUFO_skill"
}

local RedUFO = fk.CreateCard {
  name = "RedUFO",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeOffensiveRide,
  equip_skill = "#RedUFO_skill"
}

local louguan_sword__qinggang_sword = fk.CreateCard {
  name = "louguan_sword__qinggang_sword",
  attack_range = 3,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#louguan_sword__qinggang_sword_skill",
  special_skills = { "thb_weapon_recast" },
}

local bagualu_crossbow = fk.CreateCard {
  name = "bagualu_crossbow",
  attack_range = 1,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#bagualu_crossbow_skill",
  special_skills = { "thb_weapon_recast" },
}

local yangsan = fk.CreateCard {
  name = "yangsan",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = "#yangsan_skill"
}

local ganggenier__spear = fk.CreateCard {
  name = "ganggenier__spear",
  attack_range = 3,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "ganggenier__spear_skill",
  special_skills = { "thb_weapon_recast" },
}

local feixiangzhijian__halberd = fk.CreateCard {
  name = "feixiangzhijian__halberd",
  attack_range = 4,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#feixiangzhijian__halberd_skill",
  special_skills = { "thb_weapon_recast" },
}

local huiwubang = fk.CreateCard {
  name = "huiwubang",
  attack_range = 2,
  equip_skill = "#huiwubang_skill",
  special_skills = { "thb_weapon_recast" },
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
}
local yichuipiao = fk.CreateCard {
  name = "yichuipiao",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeOffensiveRide,
  equip_skill = "#yichuipiao_skill"
}

local penglaiyuzhi = fk.CreateCard {
  name = "penglaiyuzhi",
  attack_range = 1,
  equip_skill = "#penglaiyuzhi_skill",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  special_skills = { "thb_weapon_recast" },
}
local wunvfu = fk.CreateCard {
  name = "wunvfu",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  equip_skill = "wunvfu_skill",
}
local bailoujian = fk.CreateCard {
  name = "bailoujian",
  attack_range = 2,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#bailoujian_skill",
  special_skills = { "thb_weapon_recast" },
}
local tuanshan = fk.CreateCard {
  name = "tuanshan",
  attack_range = 5,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#tuanshan_skill",
  special_skills = { "thb_weapon_recast" },
}

local nianxieji = fk.CreateCard {
  name = "nianxieji",
  attack_range = 4,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#nianxieji_skill",
  special_skills = { "thb_weapon_recast" },
}
local laiwating__axe = fk.CreateCard {
  name = "laiwating__axe",
  attack_range = 3,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#laiwating__axe_skill",
  special_skills = { "thb_weapon_recast" },
}

local sishenliandao__guding_blade = fk.CreateCard {
  name = "sishenliandao__guding_blade",
  attack_range = 2,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "#sishenliandao__guding_blade_skill",
  special_skills = { "thb_weapon_recast" },
}

local yaoshi = fk.CreateCard {
  name = "yaoshi",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeDefensiveRide,
  equip_skill = "#yaoshi_skill",
}

local monvsaoba = fk.CreateCard {
  name = "monvsaoba",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeOffensiveRide,
  equip_skill = "#monvsaoba_distance",
}
local yinyangyu = fk.CreateCard {
  name = "yinyangyu",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeTreasure,
  equip_skill = "#yinyangyu_skill",
}

local qingwamao = fk.CreateCard {
  name = "qingwamao",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeTreasure,
  equip_skill = "#qingwamao_skill",
}

local banling = fk.CreateCard {
  name = "banling",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeTreasure,
  equip_skill = "#banling_skill"
}

local jiudechibang = fk.CreateCard {
  name = "jiudechibang",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeOffensiveRide,
  equip_skill = "#jiudechibang_distance",
}

local modaoshu = fk.CreateCard {
  name = "modaoshu",
  attack_range = 1,
  type = Card.TypeEquip,
  sub_type = Card.SubtypeWeapon,
  equip_skill = "modaoshu_skill",
  special_skills = { "thb_weapon_recast" },
}

local toutao = fk.CreateCard {
  name = "toutao",
  type = Card.TypeEquip,
  sub_type = Card.SubtypeArmor,
  skill = "#toutao_choose_skill",
  equip_skill = "#toutao_skill",
}


local chengguanzhifa__dismantlement = fk.CreateCard {
  name = "chengguanzhifa__dismantlement",
  type = Card.TypeTrick,
  skill = "dismantlement_skill"
}


local haorenka__nullification = fk.CreateCard {
  name = "haorenka__nullification",
  type = Card.TypeTrick,
  skill = "nullification_skill",
  is_passive = true,
}

local fengmozhen__indulgence = fk.CreateCard {
  name = "fengmozhen__indulgence",
  type = Card.TypeTrick,
  sub_type = Card.SubtypeDelayedTrick,
  skill = "fengmozhen__indulgence_skill"
}

local dongqingwa__supply_shortage = fk.CreateCard {
  name = "dongqingwa__supply_shortage",
  type = Card.TypeTrick,
  sub_type = Card.SubtypeDelayedTrick,
  skill = "dongqingwa__supply_shortage_skill",
}

local xunlongchi__ex_nihilo = fk.CreateCard {
  name = "xunlongchi__ex_nihilo",
  type = Card.TypeTrick,
  skill = "ex_nihilo_skill",
}

local zuidai__lightning = fk.CreateCard {
  name = "zuidai__lightning",
  type = Card.TypeTrick,
  sub_type = Card.SubtypeDelayedTrick,
  skill = "zuidai__lightning_skill",
}

local xijian__snatch = fk.CreateCard {
  name = "xijian__snatch",
  type = Card.TypeTrick,
  skill = "snatch_skill"
}

local danmuzhan__duel = fk.CreateCard {
  name = "danmuzhan__duel",
  skill = "duel_skill",
  type = Card.TypeTrick,
  is_damage_card = true,

}

local ditupao__archery_attack = fk.CreateCard {
  name = "ditupao__archery_attack",
  skill = "archery_attack_skill",
  type = Card.TypeTrick,
  is_damage_card = true,
  multiple_targets = true,
}

local baiguiyexing__savage_assault = fk.CreateCard {
  name = "baiguiyexing__savage_assault",
  skill = "savage_assault_skill",
  type = Card.TypeTrick,
  is_damage_card = true,
  multiple_targets = true,
}

local yanhui = fk.CreateCard {
  name = "yanhui",
  type = Card.TypeTrick,
  skill = "yanhui_skill",
  multiple_targets = true,
}

local wugufengdeng__amazing_grace = fk.CreateCard {
  name = "wugufengdeng__amazing_grace",
  skill = "amazing_grace_skill",
  type = Card.TypeTrick,
  multiple_targets = true,
}

local renxingcaokong__collateral = fk.CreateCard {
  name = "renxingcaokong__collateral",
  type = Card.TypeTrick,
  skill = "collateral_skill"
}

local saiqianxiang = fk.CreateCard {
  name = "saiqianxiang",
  skill = "saiqianxiang_skill",
  type = Card.TypeTrick,
}



extension:addCardSpec("danmu__slash", Card.Club, 2)
extension:addCardSpec("danmu__slash", Card.Club, 3)
extension:addCardSpec("danmu__slash", Card.Club, 3)
extension:addCardSpec("danmu__slash", Card.Club, 3)
extension:addCardSpec("danmu__slash", Card.Club, 3)
extension:addCardSpec("danmu__slash", Card.Diamond, 3)
extension:addCardSpec("danmu__slash", Card.Club, 4)
extension:addCardSpec("danmu__slash", Card.Club, 4)
extension:addCardSpec("danmu__slash", Card.Spade, 4)
extension:addCardSpec("danmu__slash", Card.Diamond, 4)
extension:addCardSpec("danmu__slash", Card.Club, 5)
extension:addCardSpec("danmu__slash", Card.Club, 6)
extension:addCardSpec("danmu__slash", Card.Heart, 6)
extension:addCardSpec("danmu__slash", Card.Club, 7)
extension:addCardSpec("danmu__slash", Card.Spade, 7)
extension:addCardSpec("danmu__slash", Card.Diamond, 7)
extension:addCardSpec("danmu__slash", Card.Club, 8)
extension:addCardSpec("danmu__slash", Card.Club, 8)
extension:addCardSpec("danmu__slash", Card.Spade, 8)
extension:addCardSpec("danmu__slash", Card.Spade, 8)
extension:addCardSpec("danmu__slash", Card.Diamond, 8)
extension:addCardSpec("danmu__slash", Card.Spade, 10)
extension:addCardSpec("danmu__slash", Card.Spade, 10)
extension:addCardSpec("danmu__slash", Card.Heart, 10)
extension:addCardSpec("danmu__slash", Card.Diamond, 10)
extension:addCardSpec("danmu__slash", Card.Club, 10)
extension:addCardSpec("danmu__slash", Card.Club, 10)
extension:addCardSpec("danmu__slash", Card.Club, 10)
extension:addCardSpec("danmu__slash", Card.Club, 11)
extension:addCardSpec("danmu__slash", Card.Club, 11)
extension:addCardSpec("danmu__slash", Card.Club, 11)
extension:addCardSpec("danmu__slash", Card.Heart, 11)
extension:addCardSpec("danmu__slash", Card.Heart, 11)
extension:addCardSpec("danmu__slash", Card.Spade, 11)
extension:addCardSpec("danmu__slash", Card.Spade, 11)
extension:addCardSpec("danmu__slash", Card.Heart, 12)
extension:addCardSpec("danmu__slash", Card.Spade, 12)
extension:addCardSpec("danmu__slash", Card.Spade, 12)
extension:addCardSpec("cadan__jink", Card.Heart, 2)
extension:addCardSpec("cadan__jink", Card.Diamond, 2)
extension:addCardSpec("cadan__jink", Card.Diamond, 2)
extension:addCardSpec("cadan__jink", Card.Diamond, 2)
extension:addCardSpec("cadan__jink", Card.Heart, 3)
extension:addCardSpec("cadan__jink", Card.Diamond, 3)
extension:addCardSpec("cadan__jink", Card.Heart, 4)
extension:addCardSpec("cadan__jink", Card.Diamond, 4)
extension:addCardSpec("cadan__jink", Card.Diamond, 6)
extension:addCardSpec("cadan__jink", Card.Diamond, 7)
extension:addCardSpec("cadan__jink", Card.Diamond, 8)
extension:addCardSpec("cadan__jink", Card.Diamond, 8)
extension:addCardSpec("cadan__jink", Card.Diamond, 9)
extension:addCardSpec("cadan__jink", Card.Heart, 9)
extension:addCardSpec("cadan__jink", Card.Heart, 10)
extension:addCardSpec("cadan__jink", Card.Diamond, 10)
extension:addCardSpec("cadan__jink", Card.Heart, 11)
extension:addCardSpec("cadan__jink", Card.Diamond, 11)
extension:addCardSpec("cadan__jink", Card.Heart, 12)
extension:addCardSpec("jiu", Card.Spade, 9)
extension:addCardSpec("jiu", Card.Club, 9)
extension:addCardSpec("jiu", Card.Club, 9)
extension:addCardSpec("jiu", Card.Diamond, 9)
extension:addCardSpec("jiu", Card.Diamond, 9)
extension:addCardSpec("exinwan", Card.Diamond, 11)
extension:addCardSpec("exinwan", Card.Club, 12)
extension:addCardSpec("mashu__peach", Card.Heart, 3)
extension:addCardSpec("mashu__peach", Card.Heart, 4)
extension:addCardSpec("mashu__peach", Card.Heart, 5)
extension:addCardSpec("mashu__peach", Card.Heart, 6)
extension:addCardSpec("mashu__peach", Card.Heart, 7)
extension:addCardSpec("mashu__peach", Card.Heart, 8)
extension:addCardSpec("mashu__peach", Card.Heart, 8)
extension:addCardSpec("mashu__peach", Card.Heart, 9)
extension:addCardSpec("mashu__peach", Card.Diamond, 3)
extension:addCardSpec("mashu__peach", Card.Diamond, 4)
extension:addCardSpec("mashu__peach", Card.Diamond, 12)
extension:addCardSpec("guangxuemicai__eight_diagram", Card.Spade, 2)
extension:addCardSpec("tiangoudun__nioh_shield", Card.Club, 2)
extension:addCardSpec("GreenUFO", Card.Diamond, 13)
extension:addCardSpec("GreenUFO", Card.Heart, 13)
extension:addCardSpec("GreenUFO", Card.Club, 13)
extension:addCardSpec("RedUFO", Card.Diamond, 13)
extension:addCardSpec("RedUFO", Card.Club, 13)
extension:addCardSpec("louguan_sword__qinggang_sword", Card.Spade, 4)
extension:addCardSpec("bagualu_crossbow", Card.Diamond, 1)
extension:addCardSpec("yangsan", Card.Club, 2)
extension:addCardSpec("ganggenier__spear", Card.Spade, 6)
extension:addCardSpec("feixiangzhijian__halberd", Card.Diamond, 5)
extension:addCardSpec("huiwubang", Card.Spade, 3)
extension:addCardSpec("yichuipiao", Card.Club, 9)
extension:addCardSpec("penglaiyuzhi", Card.Diamond, 1)
extension:addCardSpec("wunvfu", Card.Club, 12)
extension:addCardSpec("bailoujian", Card.Spade, 5)
extension:addCardSpec("tuanshan", Card.Heart, 5)
extension:addCardSpec("nianxieji", Card.Diamond, 10)
extension:addCardSpec("laiwating__axe", Card.Diamond, 11)
extension:addCardSpec("sishenliandao__guding_blade", Card.Spade, 2)
extension:addCardSpec("yaoshi", Card.Spade, 13)
extension:addCardSpec("monvsaoba", Card.Spade, 13)
extension:addCardSpec("yinyangyu", Card.Spade, 13)
extension:addCardSpec("yinyangyu", Card.Heart, 13)
extension:addCardSpec("qingwamao", Card.Club, 1)
extension:addCardSpec("banling", Card.Club, 1)
extension:addCardSpec("jiudechibang", Card.Spade, 9)
extension:addCardSpec("modaoshu", Card.Diamond, 12)
extension:addCardSpec("toutao", Card.Heart, 2)
extension:addCardSpec("chengguanzhifa__dismantlement", Card.Spade, 3)
extension:addCardSpec("chengguanzhifa__dismantlement", Card.Spade, 4)
extension:addCardSpec("chengguanzhifa__dismantlement", Card.Club, 4)
extension:addCardSpec("chengguanzhifa__dismantlement", Card.Club, 8)
extension:addCardSpec("chengguanzhifa__dismantlement", Card.Heart, 12)
extension:addCardSpec("haorenka__nullification", Card.Spade, 2)
extension:addCardSpec("haorenka__nullification", Card.Heart, 2)
extension:addCardSpec("haorenka__nullification", Card.Spade, 12)
extension:addCardSpec("haorenka__nullification", Card.Club, 12)
extension:addCardSpec("haorenka__nullification", Card.Diamond, 12)
extension:addCardSpec("haorenka__nullification", Card.Heart, 13)
extension:addCardSpec("fengmozhen__indulgence", Card.Spade, 9)
extension:addCardSpec("fengmozhen__indulgence", Card.Spade, 10)
extension:addCardSpec("fengmozhen__indulgence", Card.Heart, 10)
extension:addCardSpec("dongqingwa__supply_shortage", Card.Club, 5)
extension:addCardSpec("dongqingwa__supply_shortage", Card.Club, 6)
extension:addCardSpec("xunlongchi__ex_nihilo", Card.Heart, 7)
extension:addCardSpec("xunlongchi__ex_nihilo", Card.Heart, 8)
extension:addCardSpec("xunlongchi__ex_nihilo", Card.Heart, 9)
extension:addCardSpec("zuidai__lightning", Card.Heart, 1)
extension:addCardSpec("zuidai__lightning", Card.Spade, 1)
extension:addCardSpec("xijian__snatch", Card.Spade, 5)
extension:addCardSpec("xijian__snatch", Card.Diamond, 5)
extension:addCardSpec("xijian__snatch", Card.Spade, 6)
extension:addCardSpec("xijian__snatch", Card.Diamond, 6)
extension:addCardSpec("danmuzhan__duel", Card.Spade, 1)
extension:addCardSpec("danmuzhan__duel", Card.Club, 1)
extension:addCardSpec("danmuzhan__duel", Card.Diamond, 1)
extension:addCardSpec("ditupao__archery_attack", Card.Heart, 1)
extension:addCardSpec("baiguiyexing__savage_assault", Card.Spade, 7)
extension:addCardSpec("baiguiyexing__savage_assault", Card.Club, 7)
extension:addCardSpec("baiguiyexing__savage_assault", Card.Spade, 8)
extension:addCardSpec("yanhui", Card.Heart, 1)
extension:addCardSpec("wugufengdeng__amazing_grace", Card.Heart, 3)
extension:addCardSpec("wugufengdeng__amazing_grace", Card.Heart, 4)
extension:addCardSpec("renxingcaokong__collateral", Card.Club, 13)
extension:addCardSpec("renxingcaokong__collateral", Card.Diamond, 13)
extension:addCardSpec("saiqianxiang", Card.Spade, 1)
extension:addCardSpec("saiqianxiang", Card.Spade, 11)

extension:loadCardSkels {
  danmu__slash, cadan__jink, mashu__peach, exinwan, jiu,
  chengguanzhifa__dismantlement, haorenka__nullification, fengmozhen__indulgence, dongqingwa__supply_shortage,
  xunlongchi__ex_nihilo, zuidai__lightning, xijian__snatch, danmuzhan__duel, ditupao__archery_attack, baiguiyexing__savage_assault,
  yanhui, wugufengdeng__amazing_grace, renxingcaokong__collateral, saiqianxiang,
  guangxuemicai__eight_diagram, tiangoudun__nioh_shield, GreenUFO, RedUFO, feixiangzhijian__halberd, yichuipiao, tuanshan,
  nianxieji, laiwating__axe, sishenliandao__guding_blade, yaoshi, monvsaoba, yinyangyu, qingwamao, banling, jiudechibang,
  louguan_sword__qinggang_sword, bagualu_crossbow, yangsan, ganggenier__spear, huiwubang, penglaiyuzhi, wunvfu, bailoujian,
  modaoshu, toutao
}

return extension
